﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Token.Piker.Web.Admin.Activity.List" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>画题管理</title>
    <style type="text/css">
        .add
        {
            padding-right: 20px;
        }
        .add a
        {
            float: right;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p class="add">
        <a href="Add.aspx">添加</a></p>
    <p>
    </p>
    <p>
        <label for="txtKeyword">
            请输入画题主题：</label>
        <asp:TextBox ID="txtKeyword" runat="server" Width="200" Height="25"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnSearch" runat="server" Text="查询" Width="100" Height="25" 
            onclick="btnSearch_Click" />
    </p>
    <p></p>
    <asp:GridView ID="gridView" runat="server" Width="98%" CellPadding="3" BorderWidth="1px" DataKeyNames="ID"
        AutoGenerateColumns="false" PageSize="10" RowStyle-HorizontalAlign="Center">
        <Columns>
            <asp:TemplateField  HeaderText="创建人" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <%# GetAdderName(Eval("Creator"))%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Theme" HeaderText="主题" ItemStyle-HorizontalAlign="Center" />
            <asp:TemplateField HeaderText = "活动时间" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <%# ((DateTime)Eval("StartTime")).ToLongDateString()+ " - " + ((DateTime)Eval("StartTime")).ToLongDateString() %>    
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="PartCount" HeaderText="参与人数" ItemStyle-HorizontalAlign="Center" />
            <asp:TemplateField  HeaderText="活动类型" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <%# Eval("Flag").ToString() == "0" ? "线上活动" : "线下活动" %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField HeaderText="详细" DataNavigateUrlFields="ID"
                DataNavigateUrlFormatString="Show.aspx?id={0}" Text="详细" />
            <asp:HyperLinkField HeaderText="编辑" DataNavigateUrlFields="ID"
                DataNavigateUrlFormatString="Modify.aspx?id={0}" Text="编辑" />
        </Columns>
    </asp:GridView>
    <p>
    </p>
    <webdiyer:AspNetPager ID="pagerList" runat="server" Width="95%" NumericButtonCount="6"
        UrlPaging="true" NumericButtonTextFormatString="[{0}]" CustomInfoHTML=" 第 <font color='red'><b>%CurrentPageIndex%</b></font> 页 共 %PageCount% 页 显示 %StartRecordIndex%-%EndRecordIndex% 条"
        ShowCustomInfoSection="left" FirstPageText="首页" LastPageText="末页" NextPageText="下页"
        PrevPageText="上页" Font-Names="Arial" BackColor="#F8B500" AlwaysShow="true" ShowInputBox="Always"
        SubmitButtonText="跳转" OnPageChanged="pagerList_PageChanged" PageSize="10" ReverseUrlPageIndex="True">
    </webdiyer:AspNetPager>
</asp:Content>
